{% extends "admin/change_form.html" %}
{% comment %}
A copy of contrib/admin/templates/admin/change_form.html, with these changes:
- add the loading of 'postman_admin_modify' template elements set
- call block.super for every inner block
- remplace occurrences of 'submit_row' tag by 'postman_submit_row'
{% endcomment %}
{% load i18n admin_modify postman_admin_modify %}
{% block content %}<div id="content-main">
{% block object-tools %}{{ block.super }}{% endblock %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{{ block.super }}{% endblock %}
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if save_on_top %}{% postman_submit_row %}{% endif %}
{% if errors %}
    <p class="errornote">
    {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
    {{ adminform.form.non_field_errors }}
{% endif %}

{% for fieldset in adminform %}
  {% include "admin/includes/fieldset.html" %}
{% endfor %}

{% block after_field_sets %}{{ block.super }}{% endblock %}

{% for inline_admin_formset in inline_admin_formsets %}
    {% include inline_admin_formset.opts.template %}
{% endfor %}

{% block after_related_objects %}{{ block.super }}{% endblock %}

{% postman_submit_row %}

{% if adminform and add %}
   <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script>
{% endif %}

{# JavaScript for prepopulated fields #}
{% prepopulated_fields_js %}

</div>
</form></div>
{% endblock %}